<!DOCTYPE html>
<!-- saved from url=(0032)http://www.icodelogic.com/?p=441 -->
<html><head profile="http://gmpg.org/xfn/11"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta charset="UTF-8">
	<title>Scrapy入门教程 - ian的个人博客</title>
	<!--meta name="copyright" content="design by wopus.org" /-->
	<link rel="stylesheet" href="./Scrapy入门教程—1_files/style.css" type="text/css" media="screen">
	<link rel="alternate" type="application/rss+xml" title="ian的个人博客 RSS Feed" href="http://www.icodelogic.com/?feed=rss2">
	<link rel="pingback" href="http://www.icodelogic.com/xmlrpc.php">
		<script type="text/javascript" src="./Scrapy入门教程—1_files/jquery.js"></script>
	<script type="text/javascript">
		jQuery(document).ready(function($) {
			$('.menu li').hover(function() {
				$('ul', this).slideDown(300)
			},
			function() {
				$('ul', this).slideUp(300)
			});
		});
	</script>
	<link rel="alternate" type="application/rss+xml" title="ian的个人博客 下一页 » Scrapy入门教程 订阅评论" href="http://www.icodelogic.com/?feed=rss2&p=441">
<link rel="stylesheet" id="wp-pagenavi-css" href="./Scrapy入门教程—1_files/pagenavi-css.css" type="text/css" media="all">
<script type="text/javascript" src="./Scrapy入门教程—1_files/l10n.js"></script>
<script type="text/javascript" src="./Scrapy入门教程—1_files/comment-reply.js"></script>
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://www.icodelogic.com/xmlrpc.php?rsd">
<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://www.icodelogic.com/wp-includes/wlwmanifest.xml"> 
<link rel="index" title="ian的个人博客" href="http://www.icodelogic.com/">
<link rel="start" title="博客终于正式开通啦！" href="http://www.icodelogic.com/?p=5">
<link rel="prev" title="Emacs中配置Python-mode的代码自动补全" href="http://www.icodelogic.com/?p=429">
<link rel="next" title="性能优化，永无止境：Android读取Contact" href="http://www.icodelogic.com/?p=453">
<meta name="generator" content="WordPress 3.2.1">
<link rel="canonical" href="./Scrapy入门教程—1_files/Scrapy入门教程—1.htm">

<link rel="stylesheet" href="./Scrapy入门教程—1_files/wp-syntax.css" type="text/css" media="screen">
	<style type="text/css">.recentcomments a{display:inline !important;padding:0 !important;margin:0 !important;}</style>
</head>

<body>
<div id="page">
	<div id="header">
		<h1><a href="http://www.icodelogic.com/">ian的个人博客</a></h1>
		<div id="search">
			<form id="searchform" method="get" action="http://www.icodelogic.com/">
				<input type="text" class="s-text" value="" name="s" id="s" size="20">
				<input type="submit" class="s-submit" value="">
			</form>
		</div>
		<div id="nav">
			<div id="rss"><a id="rss_icon" title="订阅CodeLogic日志" href="http://www.icodelogic.com/?feed=rss2"></a></div>
			<div class="menu-%e9%a6%96%e9%a1%b5-container"><ul id="menu-%e9%a6%96%e9%a1%b5" class="menu"><li id="menu-item-164" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-164"><a href="http://icodelogic.com/">首页</a></li>
<li id="menu-item-440" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-440"><a href="http://www.icodelogic.com/?cat=6">Emacs</a></li>
<li id="menu-item-439" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-439"><a href="http://www.icodelogic.com/?cat=48">WP7</a></li>
<li id="menu-item-509" class="menu-item menu-item-type-taxonomy menu-item-object-category current-post-ancestor current-menu-parent current-post-parent menu-item-509"><a href="http://www.icodelogic.com/?cat=84">Python</a></li>
<li id="menu-item-172" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-172"><a href="http://www.icodelogic.com/?cat=3">C/C++</a></li>
<li id="menu-item-176" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-176"><a href="http://www.icodelogic.com/?cat=4">OpenGL</a></li>
<li id="menu-item-179" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-179"><a href="http://www.icodelogic.com/?page_id=2">关于</a></li>
</ul></div>		</div>
	</div><div id="main">
			<div class="post-441 post type-post status-publish format-standard hentry category-python category-72 tag-python tag-scrapy tag-86" id="post-441">
		<h2>
<div class="time">已阅读：6,787 次</div>
<a href="./Scrapy入门教程—1_files/Scrapy入门教程—1.htm" rel="bookmark">Scrapy入门教程</a>
<br>
<div class="time">ian | <a href="http://www.icodelogic.com/?cat=84" title="显示Python的所有日志" rel="category">Python</a>,<a href="http://www.icodelogic.com/?cat=72" title="显示新技术研讨的所有日志" rel="category">新技术研讨</a> | 2012/01/08</div>
                  </h2>
<br>
			<p>本文参考Scrapy Tutorial里面的文档，翻译出来加上自己的理解，供大家学习。</p>
<p>在本文中，我们将学会如何使用Scrapy建立一个爬虫程序，并爬取指定网站上的内容，这一切在Scrapy框架内实现将是很简单轻松的事情。</p>
<p>本教程主要内容包括一下四步：</p>
<p><strong>1.</strong> 创建一个新的Scrapy Project<br>
<strong>2.</strong> 定义你需要从网页中提取的元素Item<br>
<strong>3.</strong> 实现一个Spider类，通过接口完成爬取URL和提取Item的功能<br>
<strong>4.</strong> 实现一个Item PipeLine类，完成Item的存储功能</p>
<p><strong>新建工程</strong></p>
<p>首先，为我们的爬虫新建一个工程，首先进入一个目录（任意一个我们用来保存代码的目录），执行：</p>

<div class="wp_syntax"><table><tbody><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="python" style="font-family:monospace;">scrapy startproject Domz</pre></td></tr></tbody></table></div>

<p>最后的Domz就是项目名称。这个命令会在当前目录下创建一个新目录Domz，结构如下：</p>

<div class="wp_syntax"><table><tbody><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="cpp" style="font-family:monospace;">dmoz<span style="color: #000040;">/</span>
   scrapy.<span style="color: #007788;">cfg</span>   
   dmoz<span style="color: #000040;">/</span>
       __init__.<span style="color: #007788;">py</span>
       items.<span style="color: #007788;">py</span>
       pipelines.<span style="color: #007788;">py</span>
       settings.<span style="color: #007788;">py</span>
       spiders<span style="color: #000040;">/</span>
           __init__.<span style="color: #007788;">py</span></pre></td></tr></tbody></table></div>

<p>scrapy.cfg: 项目配置文件<br>
items.py: 需要提取的数据结构定义文件<br>
pipelines.py: 管道定义，用来对items里面提取的数据做进一步处理，如保存等<br>
settings.py: 爬虫配置文件<br>
spiders: 放置spider的目录</p>
<p><strong>定义Item</strong></p>
<p>在items.py里面定义我们要抓取的数据：</p>

<div class="wp_syntax"><table><tbody><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">from</span> scrapy.<span style="color: black;">item</span> <span style="color: #ff7700;font-weight:bold;">import</span> Item, Field
&nbsp;
<span style="color: #ff7700;font-weight:bold;">class</span> DmozItem<span style="color: black;">(</span>Item<span style="color: black;">)</span>:
   title = Field<span style="color: black;">(</span><span style="color: black;">)</span>
   link = Field<span style="color: black;">(</span><span style="color: black;">)</span>
   desc = Field<span style="color: black;">(</span><span style="color: black;">)</span></pre></td></tr></tbody></table></div>

<p>这里我们需要获取dmoz页面上的标题，链接，描述，所以定义一个对应的items结构，不像Django里面models的定义有那么多种类的Field，这里只有一种就叫Field()，再复杂就是Field可以接受一个default值。</p>
<p><strong>实现Spider</strong></p>
<p>spider只是一个继承字scrapy.spider.BaseSpider的Python类，有三个必需的定义的成员</p>
<p><strong>name:</strong> 名字，这个spider的标识<br>
<strong>start_urls:</strong> 一个url列表，spider从这些网页开始抓取<br>
<strong>parse():</strong> 一个方法，当start_urls里面的网页抓取下来之后需要调用这个方法解析网页内容，同时需要返回下一个需要抓取的网页，或者返回items列表</p>
<p>所以在spiders目录下新建一个spider，dmoz_spider.py:</p>

<div class="wp_syntax"><table><tbody><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">class</span> DmozSpider<span style="color: black;">(</span>BaseSpider<span style="color: black;">)</span>:
   name = <span style="color: #483d8b;">"dmoz.org"</span>
   start_urls = <span style="color: black;">[</span>
       <span style="color: #483d8b;">"http://www.dmoz.org/Computers/Programming/Languages/Python/Books/"</span>,
       <span style="color: #483d8b;">"http://www.dmoz.org/Computers/Programming/Languages/Python/Resources/"</span>
   <span style="color: black;">]</span>
&nbsp;
   <span style="color: #ff7700;font-weight:bold;">def</span> parse<span style="color: black;">(</span><span style="color: #008000;">self</span>, response<span style="color: black;">)</span>:
       filename = response.<span style="color: black;">url</span>.<span style="color: black;">split</span><span style="color: black;">(</span><span style="color: #483d8b;">"/"</span><span style="color: black;">)</span><span style="color: black;">[</span>-<span style="color: #ff4500;">2</span><span style="color: black;">]</span>
       <span style="color: #008000;">open</span><span style="color: black;">(</span>filename, <span style="color: #483d8b;">'wb'</span><span style="color: black;">)</span>.<span style="color: black;">write</span><span style="color: black;">(</span>response.<span style="color: black;">body</span><span style="color: black;">)</span></pre></td></tr></tbody></table></div>

<p><strong>提取Item</strong></p>
<p>提取数据到Items里面，主要用到XPath提取网页数据：</p>
<p>scrapy有提供两个XPath选择器，HtmlXPathSelector和XmlXPathSelector，一个用于HTML，一个用于XML，XPath选择器有三个方法</p>
<p>select(xpath): 返回一个相对于当前选中节点的选择器列表（一个XPath可能选到多个节点）<br>
extract(): 返回选择器（列表）对应的节点的字符串（列表）<br>
re(regex): 返回正则表达式匹配的字符串（分组匹配）列表<br>
一种很好的方法是在Shell里面对XPath进行测试：</p>

<div class="wp_syntax"><table><tbody><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="python" style="font-family:monospace;">scrapy shell http://www.<span style="color: black;">dmoz</span>.<span style="color: black;">org</span>/Computers/Programming/Languages/Python/Books/</pre></td></tr></tbody></table></div>

<p>现在修改parse()方法看看如何提取数据到items里面去：</p>

<div class="wp_syntax"><table><tbody><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">def</span> parse<span style="color: black;">(</span><span style="color: #008000;">self</span>, response<span style="color: black;">)</span>:
      hxs = HtmlXPathSelector<span style="color: black;">(</span>response<span style="color: black;">)</span>
      sites = hxs.<span style="color: #dc143c;">select</span><span style="color: black;">(</span><span style="color: #483d8b;">'//ul/li'</span><span style="color: black;">)</span>
      items = <span style="color: black;">[</span><span style="color: black;">]</span>
      <span style="color: #ff7700;font-weight:bold;">for</span> <span style="color: #dc143c;">site</span> <span style="color: #ff7700;font-weight:bold;">in</span> sites:
          item = DmozItem<span style="color: black;">(</span><span style="color: black;">)</span>
          item<span style="color: black;">[</span><span style="color: #483d8b;">'title'</span><span style="color: black;">]</span> = <span style="color: #dc143c;">site</span>.<span style="color: #dc143c;">select</span><span style="color: black;">(</span><span style="color: #483d8b;">'a/text()'</span><span style="color: black;">)</span>.<span style="color: black;">extract</span><span style="color: black;">(</span><span style="color: black;">)</span>
          item<span style="color: black;">[</span><span style="color: #483d8b;">'link'</span><span style="color: black;">]</span> = <span style="color: #dc143c;">site</span>.<span style="color: #dc143c;">select</span><span style="color: black;">(</span><span style="color: #483d8b;">'a/@href'</span><span style="color: black;">)</span>.<span style="color: black;">extract</span><span style="color: black;">(</span><span style="color: black;">)</span>
          item<span style="color: black;">[</span><span style="color: #483d8b;">'desc'</span><span style="color: black;">]</span> = <span style="color: #dc143c;">site</span>.<span style="color: #dc143c;">select</span><span style="color: black;">(</span><span style="color: #483d8b;">'text()'</span><span style="color: black;">)</span>.<span style="color: black;">extract</span><span style="color: black;">(</span><span style="color: black;">)</span>
          items.<span style="color: black;">append</span><span style="color: black;">(</span>item<span style="color: black;">)</span>
      <span style="color: #ff7700;font-weight:bold;">return</span> items</pre></td></tr></tbody></table></div>

<p><strong>实现PipeLine</strong></p>
<p>PipeLine用来对Spider返回的Item列表进行保存操作，可以写入到文件、或者数据库等。</p>
<p>PipeLine只有一个需要实现的方法：process_item，例如我们将Item保存到一个文件中：</p>

<div class="wp_syntax"><table><tbody><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">def</span> <span style="color: #0000cd;">__init__</span><span style="color: black;">(</span><span style="color: #008000;">self</span><span style="color: black;">)</span>:
    <span style="color: #008000;">self</span>.<span style="color: #008000;">file</span> = <span style="color: #008000;">open</span><span style="color: black;">(</span><span style="color: #483d8b;">'jingdong.txt'</span>, <span style="color: #483d8b;">'wb'</span><span style="color: black;">)</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> process_item<span style="color: black;">(</span><span style="color: #008000;">self</span>, item, spider<span style="color: black;">)</span>:
    <span style="color: #008000;">self</span>.<span style="color: #008000;">file</span>.<span style="color: black;">write</span><span style="color: black;">(</span>item<span style="color: black;">[</span><span style="color: #483d8b;">'title'</span><span style="color: black;">]</span> + <span style="color: #483d8b;">'<span style="color: #000099; font-weight: bold;">\t</span>'</span>+ item<span style="color: black;">[</span><span style="color: #483d8b;">'link'</span><span style="color: black;">]</span> + <span style="color: #483d8b;">'<span style="color: #000099; font-weight: bold;">\t</span>'</span> + item<span style="color: black;">[</span><span style="color: #483d8b;">'desc'</span><span style="color: black;">]</span>+<span style="color: #483d8b;">'<span style="color: #000099; font-weight: bold;">\n</span>'</span><span style="color: black;">)</span></pre></td></tr></tbody></table></div>

<p>到现在，我们就完成了一个基本的爬虫的实现，可以输入下面的命令来启动这个Spider:</p>

<div class="wp_syntax"><table><tbody><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="python" style="font-family:monospace;">scrapy crawl dmoz.<span style="color: black;">org</span></pre></td></tr></tbody></table></div>

					<div class="meta">
<p>原创文章,转载请注明：<strong>转载自<a href="http://www.icodelogic.com/%E2%80%9Dian%E7%9A%84%E4%B8%AA%E4%BA%BA%E5%8D%9A%E5%AE%A2%E2%80%9D">ian的个人博客</a></strong>[<a href="http://www.icodelogic.com/">http://www.icodelogic.com</a>]<br>
本文链接地址: <a href="./Scrapy入门教程—1_files/Scrapy入门教程—1.htm" title="”Scrapy入门教程”">http://www.icodelogic.com/?p=441</a></p>
<p class="alignleft">tags: <a href="http://www.icodelogic.com/?tag=python" rel="tag">Python</a>、<a href="http://www.icodelogic.com/?tag=scrapy" rel="tag">Scrapy</a>、<a href="http://www.icodelogic.com/?tag=%e7%88%ac%e8%99%ab" rel="tag">爬虫</a></p>
</div>
		</div>

		<div class="post_nav"><div class="meta">
			<span class="alignleft">« <a href="http://www.icodelogic.com/?p=429" rel="prev">Emacs中配置Python-mode的代码自动补全</a></span>
			<span class="alignright"><a href="http://www.icodelogic.com/?p=453" rel="next">性能优化，永无止境：Android读取Contact</a> »</span></div>
		</div>
		<h3>4条评论<small><a href="http://www.icodelogic.com/?p=441#postcomment" title="发表评论">▼</a></small></h3>
	<ol class="comment_list">
				<li class="comment even thread-even depth-1 parent" id="comment-492">
				<div id="div-comment-492" class="comment-body">
				<div class="comment-author vcard">
		<img alt="" src="./Scrapy入门教程—1_files/2ebd8d69f100433a842bea6a1256f997" class="avatar avatar-48 photo" height="48" width="48">		<cite class="fn">csj</cite> <span class="says">说：</span>		</div>

		<div class="comment-meta commentmetadata"><a href="http://www.icodelogic.com/?p=441#comment-492">
			2012/12/08 - 11:24</a>		</div>

		<p>我现在用Scrapy 做一个分析网页控件的脚本。<br>
比如要获取所有input类型的id,name,如果没有，就获取input的xpath.<br>
如何获取控件的xpath? 如知道请发给我的邮箱。</p>

		<div class="reply">
		<a rel="nofollow" class="comment-reply-login" href="http://www.icodelogic.com/wp-login.php?redirect_to=http%3A%2F%2Fwww.icodelogic.com%2F%3Fp%3D441">登录进行回复</a>		</div>
				</div>
		<ul class="children">
		<li class="comment byuser comment-author-admin bypostauthor odd alt depth-2" id="comment-493">
				<div id="div-comment-493" class="comment-body">
				<div class="comment-author vcard">
		<img alt="" src="./Scrapy入门教程—1_files/f22f73eed7fe834411b64fa6d0685fc1" class="avatar avatar-48 photo" height="48" width="48">		<cite class="fn">ian</cite> <span class="says">说：</span>		</div>

		<div class="comment-meta commentmetadata"><a href="http://www.icodelogic.com/?p=441#comment-493">
			2012/12/08 - 18:29</a>		</div>

		<p>一般情况下应该是知道自己要分析的网页中特定元素的xpath，如果你是要获取所有的input的话，那xpath直接就是“//input”，这个表示所有的input子元素</p>

		<div class="reply">
		<a rel="nofollow" class="comment-reply-login" href="http://www.icodelogic.com/wp-login.php?redirect_to=http%3A%2F%2Fwww.icodelogic.com%2F%3Fp%3D441">登录进行回复</a>		</div>
				</div>
		</li>
</ul>
</li>
	</ol>
	<div class="navigation">
        <span class="alignleft"></span>
        <span class="alignright"></span>
    </div>
		<div id="respond">
		<h3 id="post_comment"><div id="cancel_comment_reply"><a rel="nofollow" id="cancel-comment-reply-link" href="http://www.icodelogic.com/?p=441#respond" style="display:none;">点击这里取消回复。</a></div>发表评论</h3>
					<p>你需要先 <a href="http://www.icodelogic.com/wp-login.php?redirect_to=http%3A%2F%2Fwww.icodelogic.com%2F%3Fp%3D441">登录</a> 才能回复</p>
				<script type="text/javascript">
			<!--//--><![CDATA[//><!--
			var commenttextarea = document.getElementById('comment');
			commenttextarea.onkeydown = function quickSubmit(e) {
			if (!e) var e = window.event;
			if (e.ctrlKey && e.keyCode == 13){
			document.getElementById('submit').click();
			}
			};
			//--><!]]>
		</script>
	</div>
			</div>
<div id="sidebar">
	<ul>
		<li id="categories-3" class="widget widget_categories"><h4>分类</h4>		<ul>
	<li class="cat-item cat-item-80"><a href="http://www.icodelogic.com/?cat=80" title="查看Android下的所有日志">Android</a> (13)
</li>
	<li class="cat-item cat-item-3"><a href="http://www.icodelogic.com/?cat=3" title="C/C++">C/C++</a> (4)
</li>
	<li class="cat-item cat-item-6"><a href="http://www.icodelogic.com/?cat=6" title="Emacs">Emacs</a> (8)
</li>
	<li class="cat-item cat-item-7"><a href="http://www.icodelogic.com/?cat=7" title="Flex/AS">Flex/AS</a> (1)
</li>
	<li class="cat-item cat-item-71"><a href="http://www.icodelogic.com/?cat=71" title="查看HTML下的所有日志">HTML</a> (3)
</li>
	<li class="cat-item cat-item-20"><a href="http://www.icodelogic.com/?cat=20" title="查看Linux下的所有日志">Linux</a> (2)
</li>
	<li class="cat-item cat-item-4"><a href="http://www.icodelogic.com/?cat=4" title="OpenGL">OpenGL</a> (3)
</li>
	<li class="cat-item cat-item-84"><a href="http://www.icodelogic.com/?cat=84" title="查看Python下的所有日志">Python</a> (9)
</li>
	<li class="cat-item cat-item-5"><a href="http://www.icodelogic.com/?cat=5" title="QT">QT</a> (3)
</li>
	<li class="cat-item cat-item-48"><a href="http://www.icodelogic.com/?cat=48" title="Windows Phone 7">WP7</a> (9)
</li>
	<li class="cat-item cat-item-1"><a href="http://www.icodelogic.com/?cat=1" title="查看其他下的所有日志">其他</a> (8)
</li>
	<li class="cat-item cat-item-98"><a href="http://www.icodelogic.com/?cat=98" title="查看创意黑板报下的所有日志">创意黑板报</a> (1)
</li>
	<li class="cat-item cat-item-72"><a href="http://www.icodelogic.com/?cat=72" title="查看新技术研讨下的所有日志">新技术研讨</a> (7)
</li>
		</ul>
</li><li id="recent-comments-3" class="widget widget_recent_comments"><h4>最新评论</h4><ul id="recentcomments"><li class="recentcomments">tonyzzp - <a href="http://www.icodelogic.com/?p=575#comment-2282">图像滤镜处理算法...</a><br>博主在美图工作？</li><li class="recentcomments">spring - <a href="http://www.icodelogic.com/?p=523#comment-1460">PhoneGap优化解决...</a><br>if (ev.getEventTime() - lastT...</li><li class="recentcomments">spring - <a href="http://www.icodelogic.com/?p=523#comment-1459">PhoneGap优化解决...</a><br>ian,看了不知道怎么用哟，能不...</li><li class="recentcomments">chenfuwei - <a href="http://www.icodelogic.com/?p=605#comment-1154">Android视频渲染: ...</a><br>你是直接显示YUV数据吗？</li><li class="recentcomments">chenfuwei - <a href="http://www.icodelogic.com/?p=605#comment-1153">Android视频渲染: ...</a><br>GLSurface可以直接显示YUV数据...</li><li class="recentcomments">chenfuwei - <a href="http://www.icodelogic.com/?p=605#comment-1152">Android视频渲染: ...</a><br>直接显示回调来的YUV数据，怎么...</li><li class="recentcomments">shaoying - <a href="http://www.icodelogic.com/?p=605#comment-986">Android视频渲染: ...</a><br>解出来的视频不连续，有点卡的...</li><li class="recentcomments">as - <a href="http://www.icodelogic.com/?p=588#comment-979">图像滤镜处理算法...</a><br>感觉放大镜算法写的不对，请博...</li><li class="recentcomments">Kusar - <a href="http://www.icodelogic.com/?p=189#comment-706">界面程序开发的一...</a><br>深有同感，不过当初放弃后就再...</li><li class="recentcomments">周Ali - <a href="http://www.icodelogic.com/?p=588#comment-506">图像滤镜处理算法...</a><br>谢了，收益颇多</li></ul></li><li id="linkcat-26" class="widget widget_links"><h4>链接</h4>
	<ul class="xoxo blogroll">
<li><a href="http://www.vimer.cn/" rel="acquaintance co-worker" title="Vimer的程序世界" target="_blank">Vimer</a></li>
<li><a href="http://1mima.com/" rel="acquaintance" target="_blank">一米马</a></li>
<li><a href="http://www.favormy.com/" title="惠买购物比价网" target="_blank">惠买–购物省钱助手</a></li>

	</ul>
</li>
<li id="tag_cloud-3" class="widget widget_tag_cloud"><h4>标签</h4><div class="tagcloud"><a href="http://www.icodelogic.com/?tag=actionscript" class="tag-link-9" title="1 个主题" style="font-size: 8pt;">ActionScript</a>
<a href="http://www.icodelogic.com/?tag=android" class="tag-link-76" title="15 个主题" style="font-size: 22pt;">android</a>
<a href="http://www.icodelogic.com/?tag=c" class="tag-link-11" title="3 个主题" style="font-size: 12.6666666667pt;">C++</a>
<a href="http://www.icodelogic.com/?tag=chooser" class="tag-link-65" title="2 个主题" style="font-size: 10.8pt;">Chooser</a>
<a href="http://www.icodelogic.com/?tag=django" class="tag-link-99" title="1 个主题" style="font-size: 8pt;">Django</a>
<a href="http://www.icodelogic.com/?tag=emacs" class="tag-link-6" title="8 个主题" style="font-size: 18.1111111111pt;">Emacs</a>
<a href="http://www.icodelogic.com/?tag=emacs%e6%95%99%e7%a8%8b" class="tag-link-22" title="8 个主题" style="font-size: 18.1111111111pt;">Emacs教程</a>
<a href="http://www.icodelogic.com/?tag=flex" class="tag-link-8" title="1 个主题" style="font-size: 8pt;">Flex</a>
<a href="http://www.icodelogic.com/?tag=gdi" class="tag-link-38" title="3 个主题" style="font-size: 12.6666666667pt;">GDI</a>
<a href="http://www.icodelogic.com/?tag=glut" class="tag-link-28" title="2 个主题" style="font-size: 10.8pt;">GLUT</a>
<a href="http://www.icodelogic.com/?tag=http" class="tag-link-63" title="3 个主题" style="font-size: 12.6666666667pt;">HTTP</a>
<a href="http://www.icodelogic.com/?tag=jni" class="tag-link-108" title="4 个主题" style="font-size: 14.2222222222pt;">jni</a>
<a href="http://www.icodelogic.com/?tag=linux" class="tag-link-20" title="2 个主题" style="font-size: 10.8pt;">Linux</a>
<a href="http://www.icodelogic.com/?tag=ndk" class="tag-link-107" title="2 个主题" style="font-size: 10.8pt;">NDK</a>
<a href="http://www.icodelogic.com/?tag=opengl" class="tag-link-4" title="3 个主题" style="font-size: 12.6666666667pt;">OpenGL</a>
<a href="http://www.icodelogic.com/?tag=phonegap" class="tag-link-73" title="3 个主题" style="font-size: 12.6666666667pt;">PhoneGap</a>
<a href="http://www.icodelogic.com/?tag=python" class="tag-link-84" title="9 个主题" style="font-size: 18.8888888889pt;">Python</a>
<a href="http://www.icodelogic.com/?tag=qml" class="tag-link-16" title="1 个主题" style="font-size: 8pt;">QML</a>
<a href="http://www.icodelogic.com/?tag=qt" class="tag-link-5" title="3 个主题" style="font-size: 12.6666666667pt;">QT</a>
<a href="http://www.icodelogic.com/?tag=qthread" class="tag-link-14" title="1 个主题" style="font-size: 8pt;">QThread</a>
<a href="http://www.icodelogic.com/?tag=scrapy" class="tag-link-85" title="4 个主题" style="font-size: 14.2222222222pt;">Scrapy</a>
<a href="http://www.icodelogic.com/?tag=shell" class="tag-link-19" title="1 个主题" style="font-size: 8pt;">Shell</a>
<a href="http://www.icodelogic.com/?tag=window-phone-7" class="tag-link-49" title="3 个主题" style="font-size: 12.6666666667pt;">Window Phone 7</a>
<a href="http://www.icodelogic.com/?tag=windows" class="tag-link-23" title="3 个主题" style="font-size: 12.6666666667pt;">Windows</a>
<a href="http://www.icodelogic.com/?tag=windows%e7%bc%96%e7%a8%8b" class="tag-link-35" title="3 个主题" style="font-size: 12.6666666667pt;">windows编程</a>
<a href="http://www.icodelogic.com/?tag=wp7" class="tag-link-55" title="9 个主题" style="font-size: 18.8888888889pt;">WP7</a>
<a href="http://www.icodelogic.com/?tag=windows-phone-7" class="tag-link-48" title="5 个主题" style="font-size: 15.4666666667pt;">WP7</a>
<a href="http://www.icodelogic.com/?tag=%e4%b8%8d%e5%ae%9a%e5%8f%82%e6%95%b0" class="tag-link-15" title="1 个主题" style="font-size: 8pt;">不定参数</a>
<a href="http://www.icodelogic.com/?tag=%e4%bc%91%e7%9c%a0" class="tag-link-59" title="2 个主题" style="font-size: 10.8pt;">休眠</a>
<a href="http://www.icodelogic.com/?tag=%e5%90%8e%e5%8f%b0%e4%bb%bb%e5%8a%a1" class="tag-link-58" title="2 个主题" style="font-size: 10.8pt;">后台任务</a>
<a href="http://www.icodelogic.com/?tag=%e5%9b%be%e5%83%8f%e5%a4%84%e7%90%86" class="tag-link-109" title="3 个主题" style="font-size: 12.6666666667pt;">图像处理</a>
<a href="http://www.icodelogic.com/?tag=%e5%a2%93%e7%a2%91" class="tag-link-57" title="2 个主题" style="font-size: 10.8pt;">墓碑</a>
<a href="http://www.icodelogic.com/?tag=%e5%a4%9a%e4%bb%bb%e5%8a%a1" class="tag-link-56" title="2 个主题" style="font-size: 10.8pt;">多任务</a>
<a href="http://www.icodelogic.com/?tag=%e5%a4%9a%e7%ba%bf%e7%a8%8b" class="tag-link-13" title="1 个主题" style="font-size: 8pt;">多线程</a>
<a href="http://www.icodelogic.com/?tag=%e5%ae%9a%e4%bd%8d%e7%ac%a6" class="tag-link-12" title="1 个主题" style="font-size: 8pt;">定位符</a>
<a href="http://www.icodelogic.com/?tag=%e6%8e%a7%e4%bb%b6" class="tag-link-37" title="3 个主题" style="font-size: 12.6666666667pt;">控件</a>
<a href="http://www.icodelogic.com/?tag=%e6%b5%81%e9%94%99%e8%af%af" class="tag-link-10" title="1 个主题" style="font-size: 8pt;">流错误</a>
<a href="http://www.icodelogic.com/?tag=%e6%b7%b7%e5%90%88%e7%bc%96%e7%a8%8b" class="tag-link-17" title="1 个主题" style="font-size: 8pt;">混合编程</a>
<a href="http://www.icodelogic.com/?tag=%e6%b8%b2%e6%9f%93" class="tag-link-39" title="3 个主题" style="font-size: 12.6666666667pt;">渲染</a>
<a href="http://www.icodelogic.com/?tag=%e6%bb%a4%e9%95%9c" class="tag-link-112" title="2 个主题" style="font-size: 10.8pt;">滤镜</a>
<a href="http://www.icodelogic.com/?tag=%e7%88%ac%e8%99%ab" class="tag-link-86" title="4 个主题" style="font-size: 14.2222222222pt;">爬虫</a>
<a href="http://www.icodelogic.com/?tag=%e7%95%8c%e9%9d%a2%e5%bc%80%e5%8f%91" class="tag-link-34" title="3 个主题" style="font-size: 12.6666666667pt;">界面开发</a>
<a href="http://www.icodelogic.com/?tag=%e7%ae%a1%e9%81%93" class="tag-link-21" title="1 个主题" style="font-size: 8pt;">管道</a>
<a href="http://www.icodelogic.com/?tag=%e8%a7%86%e5%9b%be" class="tag-link-36" title="3 个主题" style="font-size: 12.6666666667pt;">视图</a>
<a href="http://www.icodelogic.com/?tag=%e8%b7%a8%e5%b9%b3%e5%8f%b0" class="tag-link-78" title="3 个主题" style="font-size: 12.6666666667pt;">跨平台</a></div>
</li><li id="meta-3" class="widget widget_meta"><h4>功能</h4>			<ul>
						<li><a href="http://www.icodelogic.com/wp-login.php">登录</a></li>
			<li><a href="http://www.icodelogic.com/?feed=rss2" title="订阅本站 RSS 2.0">日志 <abbr title="RSS">RSS</abbr></a></li>
			<li><a href="http://www.icodelogic.com/?feed=comments-rss2" title="所有日志的评论 RSS">评论 <abbr title="Really Simple Syndication">RSS</abbr></a></li>
			<!--li><a href="http://wordpress.org/" title="基于 WordPress，完美的个人信息发布平台。">WordPress.org</a></li-->
						</ul>
</li>	</ul>

</div>	<div id="footer">ian的个人博客 © 2011.|Powered by <a href="http://wordpress.org/" target="_blank">WordPress</a>.</div>
	</div>

</body></html>